from es import server
from superdice.libs.diceConfigs import configFile
from superdice.superdice import registerRoll, unregisterRoll

def es_map_start(ev):
    cfgData.execute()

def unload():
    unregisterRoll(diceRoll)

def diceRoll(userid, player, eplayer):
    server.queuecmd('wcs_givelevel ' + userid + ' ' + str(levels))

cfgData = configFile('dice_wcslevelup')
levels = cfgData.cvar('superdice_cfg_wcslevel_levels', 1, 'How many wcs levels does the player get?')
cfgData.write()
cfgData.execute()

registerRoll(diceRoll, 'wcslevel')
